xen/arm: map_dev_mmio_region: printk should be ratelimited
authorShannon Zhao <shannon.zhao@linaro.org>
Thu, 7 Apr 2016 06:28:14 +0000 (14:28 +0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 8 Apr 2016 15:35:14 +0000 (11:35 -0400)
The function map_dev_mmio_region is used in a hypercall. Therefore all
printks should be ratelimited to avoid a malicious guest flooding the
console.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/p2m.c

index 0011708bc812c6c155dd7fbcb4af3812c8aaaeec..db21433da76c76d61e5b50569f5d85adf6108060 100644 (file)
@@ -1284,7 +1284,7 @@ int map_dev_mmio_region(struct domain *d,
     res = map_mmio_regions(d, start_gfn, nr, mfn);
     if ( res < 0 )
     {
-        printk(XENLOG_ERR "Unable to map [%#lx - %#lx] in Dom%d\n",
+        printk(XENLOG_G_ERR "Unable to map [%#lx - %#lx] in Dom%d\n",
                start_gfn, start_gfn + nr - 1, d->domain_id);
         return res;
     }